package com.aierkeji.call.b2c.controller;

import java.util.Map;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.aierkeji.call.b2c.service.AkjCallClueStatisticsService;
import com.aierkeji.call.b2c.service.AkjCallCmsApiService;

@RestController
@RequestMapping("cmsApi")
public class AkjCallCmsApiController {
	private final Logger log = LogManager.getLogger(getClass());
	
	@Autowired
	AkjCallCmsApiService akjCallCmsApiService;
	
	@Autowired
	AkjCallClueStatisticsService akjCallClueStatisticsService;
	
	@PostMapping("getYZM")
	public Map<String, Object> getYZM(@RequestBody Map<String, Object> map) {
		return akjCallCmsApiService.getYZM(map);
	}
	@PostMapping("loginByYzm")
	public Map<String, Object> loginByYzm(@RequestBody  Map<String, Object> map) {
		return akjCallCmsApiService.loginByYzm(map);
	}
	@PostMapping("updateStatistics")
	public Map<String, Object> updateStatistics(@RequestBody  Map<String, Object> map) {
		
		return akjCallClueStatisticsService.putStaticsQueue(map);
	}
	
}
